﻿using System.Collections.Generic;
using System.Xml.Serialization;

namespace WoodRobotics.Weather.ModelView
{
    [XmlRoot("xml_api_reply")]
    public class xml_api_reply
    {
        [XmlElement("weather")]
        public Weather Weather { get; set; }
    }
    public class Weather
    {
        [XmlElement("forecast_information")]
        public ForecastInformation ForecastInformation { get; set; }
        [XmlElement("current_conditions")]
        public CurrentConditions CurrentCondition { get; set; }
        [XmlElement("forecast_conditions")]
        public List<ForecastConditions> ForecastConditions { get; set; }
    }
    public class ForecastInformation
    {
        [XmlElement("city")]
        public DataAttribute City { get; set; }
        [XmlElement("postal_code")]
        public DataAttribute PostalCode { get; set; }
        [XmlElement("latitude_e6")]
        public DataAttribute Latitude { get; set; }
        [XmlElement("longitude_e6")]
        public DataAttribute Logitude { get; set; }
        [XmlElement("forecast_date")]
        public DataAttribute ForcastDate { get; set; }
        [XmlElement("current_date_time")]
        public DataAttribute CurrentDate { get; set; }
        [XmlElement("unit_system")]
        public DataAttribute UnitSystem { get; set; }
    }
    public class CurrentConditions
    {
        [XmlElement("condition")]
        public DataAttribute Condition { get; set; }
        [XmlElement("temp_f")]
        public DataAttribute Temp_f { get; set; }
        [XmlElement("temp_c")]
        public DataAttribute Temp_c { get; set; }
        [XmlElement("humidity")]
        public DataAttribute Humidity { get; set; }
        [XmlElement("icon")]
        public DataAttribute Icon { get; set; }
        [XmlElement("wind_condition")]
        public DataAttribute WindCondition { get; set; }
    }
    public class ForecastConditions
    {
        [XmlElement("day_of_week")]
        public DataAttribute DayOfWeek { get; set; }
        [XmlElement("low")]
        public DataAttribute Low { get; set; }
        [XmlElement("high")]
        public DataAttribute High { get; set; }
        [XmlElement("icon")]
        public DataAttribute Icon { get; set; }
        [XmlElement("condition")]
        public DataAttribute Condition { get; set; }
    }
    public class DataAttribute
    {
        [XmlAttribute("data")]
        public string Data { get; set; }
    }
}
